<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:93:"D:\php_study\PHPTutorial\WWW\yin\public_html/../application/admin\view\mul\mission\lists.html";i:1528344261;s:75:"D:\php_study\PHPTutorial\WWW\yin\application\admin\view\layout\default.html";i:1526467896;s:72:"D:\php_study\PHPTutorial\WWW\yin\application\admin\view\common\meta.html";i:1526467896;s:74:"D:\php_study\PHPTutorial\WWW\yin\application\admin\view\common\script.html";i:1526467896;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
    <head>
        <meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/yin/public_html/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/yin/public_html/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/yin/public_html/assets/js/html5shiv.js"></script>
  <script src="/yin/public_html/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    var require = {
        config:  <?php echo json_encode($config); ?>
    };
</script>
    </head>

    <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    <?php echo __('Dashboard'); ?>
                                    <small><?php echo __('Control panel'); ?></small>
                                </h1>
                            </section>
                            <?php if(!IS_DIALOG && !$config['fastadmin']['multiplenav']): ?>
                            <!-- RIBBON -->
                            <div id="ribbon">
                                <ol class="breadcrumb pull-left">
                                    <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
                                </ol>
                                <ol class="breadcrumb pull-right">
                                    <?php foreach($breadcrumb as $vo): ?>
                                    <li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
                                    <?php endforeach; ?>
                                </ol>
                            </div>
                            <!-- END RIBBON -->
                            <?php endif; ?>
                            <div class="content">
                                <style>
    .jj:hover{
        color:red;
    }
    .status:hover{
        color:#0b93d5;
    }
    #btn-end{
        background-color:red;
    }
</style>
<table class="table table-striped">
    <thead>
    <tr>
        <th>任务名称</th>
        <th>用户名称</th>
        <th>饭店名称</th>
        <th>门头照</th>
        <th>备注</th>
        <th>状态</th>
        <th>报名时间</th>
        <th>平台确认时间</th>
        <th>金主确认完成时间</th>
        <th>结账时间戳</th>
        <th>查看地图</th>
    </tr>
    </thead>
    <tbody>
    <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$row): $mod = ($i % 2 );++$i;?>
    <tr>
        <td><?php echo $row['mission_id']; ?></td>
        <td><?php echo $row['user_id']; ?></td>
        <td><?php echo $row['company_name']; ?></td>
        <td><img style="width:30px;height:30px;" src="<?php echo $row['company_photo']; ?>"/></td>
        <td><?php echo $row['summary']; ?></td>
        <td>
            <span  class="status" ids="<?php echo $row['id']; ?>" style="cursor:pointer;"><?php echo $row['status']; ?></span>
            <?php if($row['status'] == '已报名'): ?>
                <br/>
                <span style="cursor:pointer;"class="jj" ids="<?php echo $row['id']; ?>">拒绝</span>
            <?php endif; ?>
            </td>
        <td><?php echo date('Y-m-d',$row['create_time']); ?></td>
        <td><?php echo date('Y-m-d',$row['verify_time']); ?></td>
        <td><?php echo date('Y-m-d',$row['done_time']); ?></td>
        <td><?php echo date('Y-m-d',$row['pay_time']); ?></td>
        <td class="dt" style="cursor:pointer;" ide="<?php echo $row['id']; ?>">点击查看</td>
    </tr>

    <?php endforeach; endif; else: echo "" ;endif; ?>

    </tbody>
</table>
<div class="hide layer-footer">
    <label class="control-label col-xs-12 col-sm-2"></label>
    <div class="col-xs-12 col-sm-8">
        <button type="reset" id="#btn-end"class=" btn btn-primary btn-embossed " onclick="end(<?php echo $ids; ?>)">已结束</button>
        <button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();"><?php echo __('Close'); ?></button>
    </div>
</div>
<script src="/yin/public_html/assets/js/jquery-1.11.3.min.js"></script>
<script>
    $(function () {
        $('.status').click(function(){
            var id=$(this).attr('ids');
            $.ajax({
                url: "<?php echo url('mul.missionemployee/modify'); ?>",
                data:{'id':id},
                success: function(res){
                    layer.alert(res.msg,function(){
                        window.location.reload();
                    });
                }});
        });
        $('.jj').click(function(){
            var id=$(this).attr('ids');

            $.ajax({
                url: "<?php echo url('mul.missionemployee/jj'); ?>",
                data:{'id':id},
                success: function(res){
                    layer.alert(res.msg,function(){
                        window.location.reload();
                    });
                }});
        });
        $('.dt').click(function(){
            var that = this;
            var ids=$(this).attr('ide');
            layer.open({
                type: 2 //此处以iframe举例
                , title: '地图'
                , area: ['700px', '500px']
                , shade: 0
                , maxmin: true
                , offset: 'auto'
                ,scrollbar: false
                , content: "<?php echo url('mul.missionemployee/dt'); ?>?ids="+ids
                , btn: ['关闭'] //只是为了演示
                , yes: function () {
                    layer.closeAll();
                }


                , zIndex: layer.zIndex //重点1
                , success: function (layero) {
                    layer.setTop(layero); //重点2
                }
            });


        });

    });
    function end(id) {
        $.ajax({
            url: "<?php echo url('mul.mission/end'); ?>",
            data:{'id':id},
            success: function(res){
                if(res.code>0){
                    layer.alert(res.msg,function(){
                        parent.location.reload();
                    });
                }else{
                    layer.alert(res.msg);
                }
            }});
    }
</script>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="/yin/public_html/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/yin/public_html/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo $site['version']; ?>"></script>
    </body>
</html>